home *** CD-ROM | disk | FTP | other *** search
- Path: nntp.teleport.com!usenet
- From: GHouck <hksys@teleport.com>
- Newsgroups: comp.lang.c++
- Subject: Re: Reverting of big array ?
- Date: 28 Mar 1996 01:02:07 GMT
- Organization: systems hk
- Message-ID: <4jcoef$8bm@nadine.teleport.com>
- References: <31587ACF.59D9@teleport.com> <4jbock$s7j@erinews.ericsson.se>
- NNTP-Posting-Host: ip-pdx09-41.teleport.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.22 (Windows; I; 32bit)
-
- etmbgom@ericsson.se (Ben van Gompel) wrote:
- >In article <31587ACF.59D9@teleport.com>, GHouck <hksys@teleport.com> writes:
- >> Thomas,
- >> It might not be much faster, but I usually use the following:
- >>
- >> for( i=0; i<numChars/2; i++ )
- >> strChars[i] = strChars[numChars-i-1];
- >
- >That won't work.
- >You better use something like:
- >
- > char* newChars = new char[numChars+1]
- > for( i=0; i<numChars; i++ )
- > {
- > newChars[i] = oldChars[numChars-i-1];
- > }
- > newChars[numChars] = '\0';
- >
- >But still, this won't be fast enough I'd guess.
- >
- >Regards, Ben
- Ben,
- Just out of curiousity, why won't it work?
- Yours, Geoff Houck
-
-
-